//
//  ViewController.m
//  5.SoundPlayer
//
//  Created by iD Student on 7/8/13.
//  Copyright (c) 2013 iD Student. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    NSURL *url = [[NSBundle mainBundle]URLForResource:@"laser" withExtension:@"mp3"];
    NSError *error;
    explosionSound = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
    if (error != nil);
    {
        NSLog(@"Explosion Sound Could not be loaded!");
    }
    url = [NSURL URLWithString:@"laser.mp3"]; 
    error = nil;
    laserSound = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
    if(error != nil)
    {
        NSLog(@"Laser Sound Could not be loaded!");
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
